﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Add.aspx.cs" Inherits="WinnerCMS.WebUI.Admin.Model.Add" %>


<%@ Register Src="../UC_AjaxLoading.ascx" TagName="UC_AjaxLoading" TagPrefix="uc1" %>
<!doctype html>
<html>
<head runat="server">
    <title>添加模型</title>
    <meta charset="utf-8">
    <meta content="no-cache" http-equiv="Pragma" />
    <%: Scripts.Render("~/Scripts/AdminBase") %>
    <%: Styles.Render("~/Content/Bootstrap/css") %>
    
    <script type="text/javascript">
        $(function ()
        {
            var prm = Sys.WebForms.PageRequestManager.getInstance();
            //prm.add_endRequest(function () { $("#tabs").tabs(); });
             
            $('#DL_Filter input').iCheck({
                    checkboxClass: 'icheckbox_flat',
                    radioClass: 'iradio_flat'
                });
        });
    </script>

    <style type="text/css">
        .style1
        {
        	color:Red;
        }
        
        .RowTitle
        {
        	width:200px;
        }
        label
        {
            display:inline;
        }
    </style>
</head>
<body>
    <form id="form1" runat="server">
    <asp:ScriptManager ID="ScriptManager1" runat="server">
    </asp:ScriptManager>
    <asp:UpdateProgress ID="UpdateProgress1" runat="server" AssociatedUpdatePanelID="UpdatePanel1">
        <ProgressTemplate>
            <uc1:UC_AjaxLoading ID="UC_AjaxLoading1" runat="server" />
        </ProgressTemplate>
    </asp:UpdateProgress>
    <asp:UpdatePanel ID="UpdatePanel1" runat="server">
        <ContentTemplate>
            <div id="tabs" class="easyui-tabs">
           <div title="基本属性">
            <table style="width: 100%;" id="Tab0" class="TabelGrid">
                <tr>
                    <td class="RowTitle">
                        模型别名：
                    </td>
                    <td>
                        <asp:TextBox ID="txtModelName" runat="server" Width="250px"></asp:TextBox>
                        <span class="style1">*</span>
                        <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ControlToValidate="txtModelName"
                            ErrorMessage="请输入模型别名" Display="Dynamic"></asp:RequiredFieldValidator>
                    </td>
                </tr>
                <tr>
                    <td class="RowTitle" valign="top">
                        &nbsp; 数据库表：
                    </td>
                    <td>
                        <asp:TextBox ID="txtDataTable" runat="server" Width="250px">WinnerCMS_Extend_</asp:TextBox>
                        <span class="style1">*</span>
                        <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" ControlToValidate="txtDataTable"
                            ErrorMessage="请输入数据库表"></asp:RequiredFieldValidator>
                        <br />
                        说明：扩展的模型表名必须用“WinnerCMS_Extend_”作前缀，以避免冲突。<br />
                        警告：<font color="#FF0000"><strong>保存以后该表将不能再改名，请认真填写。</strong></font>
                    </td>
                </tr>
                <tr>
                    <td class="RowTitle">
                        继承基本模型：
                    </td>
                    <td align="left">
                        <asp:DropDownList ID="ddlBaseModel" runat="server" OnSelectedIndexChanged="ddlBaseModel_SelectedIndexChanged"
                            AutoPostBack="True">
                            <asp:ListItem Value="Soft">下载系统 </asp:ListItem>
                            <asp:ListItem Value="Article">新闻系统</asp:ListItem>
                            <asp:ListItem Value="Photo">图库展示</asp:ListItem>
                            <asp:ListItem Value="Shop">商城系统</asp:ListItem>
                            <asp:ListItem Value="Ask">问答系统 </asp:ListItem>
                            <asp:ListItem Value="Music" Enabled="false">音乐系统</asp:ListItem>
                            <asp:ListItem Value="Flash" Enabled="false">FLASH系统</asp:ListItem>
                            <asp:ListItem Value="Picture" Enabled="false">图片系统</asp:ListItem>
                            <asp:ListItem Value="Info" Enabled="false">分类信息</asp:ListItem>
                        </asp:DropDownList>
                        <br />
                        警告：<font color="#FF0000"><strong>保存以后将不能再修改，请认真填写。</strong></font>
                    </td>
                </tr>
                <tr>
                    <td class="RowTitle">
                        内容名称：
                    </td>
                    <td>
                        <asp:TextBox ID="txtContentName" runat="server" Width="250px"></asp:TextBox>
                        <span class="style1">*</span>
                        比如“文章”、“软件”
                        <asp:RequiredFieldValidator ID="RequiredFieldValidator3" runat="server" ControlToValidate="txtContentName"
                            ErrorMessage="请输入内容名称"></asp:RequiredFieldValidator>
                    </td>
                </tr>
                <tr>
                    <td class="RowTitle">
                        内容单位：
                    </td>
                    <td>
                        <asp:TextBox ID="txtContentUnit" runat="server" Width="250px"></asp:TextBox>
                        <span class="style1">*</span>
                        比如“篇”、“个”
                        <asp:RequiredFieldValidator ID="RequiredFieldValidator4" runat="server" ControlToValidate="txtContentUnit"
                            ErrorMessage="请输入内容单位"></asp:RequiredFieldValidator>
                    </td>
                </tr>
                 <tr>
                    <td class="RowTitle">
                        存放目录：
                    </td>
                    <td>
                        <asp:TextBox ID="txtHtmlSavePath" runat="server"></asp:TextBox>比如/Article/
                        <asp:RequiredFieldValidator ID="RequiredFieldValidator5" runat="server" ControlToValidate="txtHtmlSavePath"
                            ErrorMessage="请输入存放目录"></asp:RequiredFieldValidator>
                        <br />
                        警告：<font color="#FF0000"><strong>保存以后将不能再修改，请认真填写。</strong></font>
                    </td>
                </tr>
                <tr>
                    <td class="RowTitle">
                        备注：
                    </td>
                    <td>
                        <asp:TextBox ID="txtRemark" runat="server" Height="100px" TextMode="MultiLine" Width="300px"></asp:TextBox>
                    </td>
                </tr>
            </table></div><div title="功能伸缩">
            <table style="width: 100%;" id="Tab1" class="TabelGrid">
                <tr>
                    <td class="RowTitle">
                        字段选用：<br />
                        <span style="font-weight: normal">鼠标放字段上面能显示英文字段名称</span>
                    </td>
                    <td style=" width:600px">
                        <asp:DataList ID="DL_Filter" runat="server" RepeatColumns="4" Width="100%" 
                            RepeatDirection="Horizontal" CssClass=" table-condensed">
                            <ItemTemplate>
                                <BootStrap:CheckBox ID="CheckBox1" runat="server" Text='<%# Eval("Explain") %>'
                                    Checked='<%# Eval("Checked") %>' /></ItemTemplate>
                        </asp:DataList>
                    </td>
                </tr>
            </table></div><div title="生成静态页">
            <table style="width: 100%;" id="Tab2" class="TabelGrid">
                <tr>
                    <td class="RowTitle" valign="top">
                        全模型静态设置：
                    </td>
                    <td>
                        <asp:RadioButtonList ID="RBL_EnableStatic" runat="server" 
                            RepeatDirection="Horizontal"   CssClass="icheckboxStyle">
                            <asp:ListItem Value="1">开启</asp:ListItem>
                            <asp:ListItem Value="0" Selected="True">关闭</asp:ListItem>
                        </asp:RadioButtonList>
                        本程序支持动态、静态页混合，设置为启用生成以后在<b> 栏目管理 </b>依然可以单独为栏目设置为使用动态。
                    </td>
                </tr>
               
                
                <tr>
                    <td class="RowTitle">
                        &nbsp; 栏目生成HTML的最大页数：
                    </td>
                    <td>
                        <WinnerCMS:NumericTextBox ID="NtxtMaxCategoryPageNo" runat="server">10</WinnerCMS:NumericTextBox>
                        <asp:RequiredFieldValidator ID="RequiredFieldValidator6" runat="server" ControlToValidate="NtxtMaxCategoryPageNo"
                            ErrorMessage="请输入栏目生成HTML的最大页数"></asp:RequiredFieldValidator>
                        <br />
                        只有选择了生成静态页的规则才生效。该 设置为选用生成静态页的用户节约硬盘，当生成的静态页大于设置数的时候就变成使用动态页。<br />
                        设置为0为生成所有的静态页面，建议设置为5-10，很少游客会访问那么后的网页，动态页本身就有很高负载能力用它就够了。
                    </td>
                </tr>
            </table></div><div title="上传属性">
            <table style="width: 100%;" id="Tab3" class="TabelGrid">
                <tr>
                    <td class="RowTitle">
                        后台上传目录：
                    </td>
                    <td>
                        <asp:RadioButtonList ID="RBL_AdminUploadPath" runat="server" 
                            RepeatDirection="Horizontal"  CssClass="icheckboxStyle">
                            <asp:ListItem Selected="True" Value="1">以栏目上传目录为父目录</asp:ListItem>
                            <asp:ListItem Value="2">以CMS上传目录为父目录</asp:ListItem>
                        </asp:RadioButtonList>
                       
                        <asp:DropDownList ID="ddlAdminUploadPath" runat="server">
                           <asp:ListItem Value="">不设置下级目录</asp:ListItem>
                            <asp:ListItem Value="yy-MM-dd">yy-MM-dd</asp:ListItem>
                            <asp:ListItem Value="yy/MM-dd">yy/MM-dd</asp:ListItem>
                            <asp:ListItem Value="yy/MM/dd">yy/MM/dd</asp:ListItem>
                            <asp:ListItem Value="yyMMdd">yyMMdd</asp:ListItem>
                        </asp:DropDownList>
                        
                    </td>
                </tr>
                <tr>
                    <td class="RowTitle">
                        后台上传大小：
                    </td>
                    <td>
                        <WinnerCMS:NumericTextBox ID="NtxtAdminUploadSize" runat="server" Text="1000"></WinnerCMS:NumericTextBox>
                        &nbsp;KB
                        <asp:RequiredFieldValidator ID="RequiredFieldValidator7" runat="server" ControlToValidate="NtxtAdminUploadSize"
                            ErrorMessage="请输入后台上传大小"></asp:RequiredFieldValidator>
                    </td>
                </tr>
                <tr>
                    <td class="RowTitle">
                        后台上传文件扩展名：
                    </td>
                    <td>
                        <asp:TextBox ID="txtAdminFileTypes" runat="server" Width="317px">.gif|.jpg|.swf|.rar|.zip|.mp3|.wmv</asp:TextBox>
                        (多个请用“|”格开，如：.gif|.jpg)
                        <asp:RequiredFieldValidator ID="RequiredFieldValidator8" runat="server" ControlToValidate="txtAdminFileTypes"
                            ErrorMessage="请输入后台上传文件扩展名"></asp:RequiredFieldValidator>
                    </td>
                </tr>
                <tr>
                    <td colspan="2">
                        <hr style="padding: 0px; margin: 0px; border-width: 0px" />
                    </td>
                </tr>
                <tr>
                    <td class="RowTitle">
                        前台上传文件：
                    </td>
                    <td>
                        <asp:RadioButtonList ID="RBL_EnableMemberUpload" runat="server" 
                            RepeatDirection="Horizontal" CssClass="icheckboxStyle">
                            <asp:ListItem Value="True">允许有权限角色</asp:ListItem>
                            <asp:ListItem Value="False" Selected="True">全部禁止</asp:ListItem>
                        </asp:RadioButtonList>
                    </td>
                </tr>
                <tr>
                    <td class="RowTitle">
                        前台上传目录：
                    </td>
                    <td>
                        <asp:RadioButtonList ID="RBL_MemberUploadPath" runat="server" 
                            RepeatDirection="Horizontal" CssClass="icheckboxStyle">
                            <asp:ListItem Selected="True" Value="1">以栏目上传目录为父目录</asp:ListItem>
                            <asp:ListItem Value="2">以会员上传目录为父目录</asp:ListItem>
                        </asp:RadioButtonList>
                       
                        <asp:DropDownList ID="ddlMemberUploadPath" runat="server">
                            <asp:ListItem Value="">不设置下级目录</asp:ListItem>
                            <asp:ListItem Value="yy-MM-dd">yy-MM-dd</asp:ListItem>
                            <asp:ListItem Value="yy/MM-dd">yy/MM-dd</asp:ListItem>
                            <asp:ListItem Value="yy/MM/dd">yy/MM/dd</asp:ListItem>
                            <asp:ListItem Value="yyMMdd">yyMMdd</asp:ListItem>
                        </asp:DropDownList>
                       
                    </td>
                </tr>
                <tr>
                    <td class="RowTitle">
                        前台上传文件大小：
                    </td>
                    <td>
                        <WinnerCMS:NumericTextBox ID="NtxtMemberUploadSize" runat="server" Text="1000"></WinnerCMS:NumericTextBox>
                        &nbsp;KB
                        <asp:RequiredFieldValidator ID="RequiredFieldValidator9" runat="server" ControlToValidate="NtxtMemberUploadSize"
                            ErrorMessage="请输入前台上传文件大小"></asp:RequiredFieldValidator>
                    </td>
                </tr>
                <tr>
                    <td class="RowTitle">
                        前台上传文件扩展名：
                    </td>
                    <td>
                        <asp:TextBox ID="txtMemberFileTypes" runat="server" Width="317px">.gif|.jpg|.swf|.rar|.zip|.mp3|.wmv</asp:TextBox>
                        &nbsp;&nbsp;(多个请用“|”格开，如：.gif|.jpg) <asp:RequiredFieldValidator
                         ID="RequiredFieldValidator10" runat="server" ControlToValidate="txtMemberFileTypes"
                            ErrorMessage="请输入前台上传文件扩展名"></asp:RequiredFieldValidator>
                    </td>
                </tr>
            </table></div><div title="其他属性">
            <table style="width: 100%;" id="Tab4" class="TabelGrid">
                <tr>
                    <td class="RowTitle">
                        &nbsp; 后台录入默认审核？
                    </td>
                    <td>
                        <asp:RadioButtonList ID="RBL_AdminPass" runat="server" 
                            RepeatDirection="Horizontal" CssClass="icheckboxStyle">
                            <asp:ListItem Selected="True" Value="True">审核</asp:ListItem>
                            <asp:ListItem Value="False">不审核</asp:ListItem>
                        </asp:RadioButtonList>
                    </td>
                </tr>
                <tr>
                    <td class="RowTitle">
                        自动评论审核：
                    </td>
                    <td>
                        <asp:RadioButtonList ID="RBL_CommentAutoPass" runat="server" 
                            RepeatDirection="Horizontal" CssClass="icheckboxStyle">
                            <asp:ListItem Selected="True" Value="True">审核</asp:ListItem>
                            <asp:ListItem Value="False">不审核</asp:ListItem>
                        </asp:RadioButtonList>
                    </td>
                </tr>
                <tr>
                    <td class="RowTitle">
                        投稿功能：
                    </td>
                    <td>
                        <asp:RadioButtonList ID="RBL_Contribution" runat="server" 
                            RepeatDirection="Horizontal" CssClass="icheckboxStyle">
                            <asp:ListItem Selected="True" Value="True">开启</asp:ListItem>
                            <asp:ListItem Value="False">关闭</asp:ListItem>
                        </asp:RadioButtonList><br/> 如果选择“关闭”，保存以后会把本模型下所有栏目的投稿功能的设置全部设置为关闭。
                        
                    </td>
                </tr>
                <tr>
                    <td class="RowTitle">
                        搜索选项：
                    </td>
                    <td>
                        <asp:RadioButtonList ID="RBL_SearchOption" runat="server" 
                            RepeatDirection="Horizontal" CssClass="icheckboxStyle">
                            <asp:ListItem Value="1">标题</asp:ListItem>
                            <asp:ListItem Selected="True" Value="2">内容</asp:ListItem>
                            <asp:ListItem Value="3">标题和内容</asp:ListItem>
                        </asp:RadioButtonList>
                    </td>
                </tr>
                <tr>
                    <td class="RowTitle">
                        前台分页：
                    </td>
                    <td>
                        <WinnerCMS:NumericTextBox ID="NtxtPageSize" runat="server" Text="20"></WinnerCMS:NumericTextBox>
                        <asp:RequiredFieldValidator ID="RequiredFieldValidator52" runat="server" 
                            ControlToValidate="NtxtPageSize" ErrorMessage="请输入前台分页"></asp:RequiredFieldValidator>
                    </td>
                </tr>
                <tr>
                    <td class="RowTitle">
                        几天内属于新数据？
                    </td>
                    <td>
                        <WinnerCMS:NumericTextBox ID="NtxtNewSignKeep" runat="server">0</WinnerCMS:NumericTextBox>
                        <br />
                        用于显示new标志。<br />
                        如果为0将不区别新旧数据。
                    </td>
                </tr>
            </table></div>
 </div>
            <div style="text-align: center; margin-top: 10px">
                <BootStrap:Button ID="btnOK" runat="server" Text="添加" ToDo="ClickOnce"
                    OnClick="btnOK_Click" HasValidateControl="True" />
            </div>
        </ContentTemplate>
    </asp:UpdatePanel>
 
    </form>
</body>
</html>
